package com.laowang.project.system.domain;

import java.math.BigDecimal;
import java.util.Date;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.laowang.framework.aspectj.lang.annotation.Excel;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.transaction.annotation.Transactional;

import javax.persistence.*;
import javax.validation.constraints.NotBlank;
import java.io.Serializable;
import java.util.List;

/**
 * 商家用户对象 my_cyh_shop_cattle_user
 *
 * @author laowang
 * @date 2024-04-26
 */
@NoArgsConstructor
@Data
public class MyCyhShopCattleUser implements Serializable {
    private static final long serialVersionUID = 1L;

    /**
     * $column.columnComment
     */
    @ApiModelProperty(value = "${comment}", required = false)
    private Integer id;

    /**
     * 账户
     */
    @Excel(name = "账户")
    @ApiModelProperty(value = "账户", required = false)
    @NotBlank(message = "账号不能为空")
    private String username;

    /**
     * 密码
     */
    @Excel(name = "密码")
    @ApiModelProperty(value = "密码", required = false)
    @NotBlank(message = "输入的密码不能为空")
    private String password;

    @Transient
    private String password1;

    /**
     * 金额
     */
    @Excel(name = "金额")
    @ApiModelProperty(value = "金额", required = false)
    private BigDecimal amount;

    /**
     * 创建时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Excel(name = "创建时间", width = 30, dateFormat = "yyyy-MM-dd")
    @ApiModelProperty(value = "创建时间", required = false)
    private Date created;

    /**
     * 关联到用户id
     */
    @Excel(name = "关联到用户id")
    @ApiModelProperty(value = "关联到用户id", required = false)
    private Integer userId;


    @Transient
    private List<Integer> ids;
}
